<div class="loding_context" *ngIf="loading" id="loding_context"></div>
<div class="modal fade addKeyWordWin" data-backdrop="static" id="addKeywordWin">
  <div class="modal-dialog modal-lg modal-dialog-centered" style="width: 1000px;">
    <div class="modal-content">
      <!-- 模态框头部 -->
      <div class="modal-header">
        <h4 class="modal-title">新增主题词 — {{themeTableName}}</h4>
        <button type="button" class="close" data-dismiss="modal">&times;</button>
      </div>
      <!-- 模态框主体 -->
      <div class="modal-body">
        <div class="container">
          <div class="PI-keyWordBox" style="height:480px;">

            <div class="row txtTitle">
              <input type="text" class="input_style input_style_sreach" #queryCriteria="ngModel" name="searchData" placeholder="请输入主题词名称"
                (input)="changesearch()" (keyup.enter)="changesearch()" [(ngModel)]="searchData" />

              <button class="btn btn-search btn-blue" (click)="search()" mat-button>查询</button>

              <div class="form-group pull-right" style="height:30px;margin-left:5px;">
                <span class="pull-left form-span span_left_search">主题词：</span>
              </div>
              <input *ngIf="internalParam.completeStatus != '1'" type="text" class="input_style_add" name="themeName" #name="ngModel" placeholder="请输入主题词名称"
                [(ngModel)]="themeName" />
              <!-- <div class="form-group pull-right" style="height:30px;">
                <span class="pull-left form-span span_left_search">编码：</span>
              </div>
              <input *ngIf="internalParam.completeStatus != '1'" type="text" class="input_style_add" name="themeCode" #name="ngModel" placeholder="请输入编码"
                [(ngModel)]="themeCode" /> -->

              <button *ngIf="internalParam.completeStatus != '1'" class="btn btn-blue"  (click)="_addThemeWord()" [disabled]="_isNameEmpty()">确定新增</button>
            </div>

            <div class="row">
              <div class="col-md-4">
                <div class="PI-keyWord-Left">
                  <p>主题词</p>
                  <div class="PI-keyWord-Left-input" style="height: 400px;">
                    <div class="row treeview treeviewBox" style="overflow-y: scroll;height: 390px;margin-top:2px;border:0px;"
                      infinite-scroll
                      [infiniteScrollDistance]="1"
                      [infiniteScrollThrottle]="50"
                      (scrolled)="onScrollDown()"
                      [scrollWindow]="false"
                    >
                      <div id="tree" class="treeview">
                        <p-tree [value]="treeDataScroll" selectionMode="multiple" (onNodeSelect)="_nodeSelect($event)"
                          [(selection)]="selectedFile"></p-tree>
                      </div>
                    </div>
                    <div class="pagination" style="width:220px;display: none" *ngIf="treeData && treeData.length > 0">
                        <li class="page-item" [ngClass]="{'active': previousActive}"><a class="page-link" href="javascript:void(0);" (click)="onScrollUp()">上一页</a></li>
                        <li class="page-item" [ngClass]="{'active': nextActive}"><a class="page-link" href="javascript:void(0);" (click)="onScrollDown()">下一页</a></li>
                    </div>
                  </div>
                  <!-- 分页 BEGIN -->
                  
                  <!-- <app-pagination [getTotalItems]="this.r_total" [showLeft]="false" (isLoadTableFromPagination)="r_pagination($event)"></app-pagination> -->
                  <!-- 分页 END -->
                </div>

              </div>
              <div class="col-md-8 PI-keyWord-Right" style="border: 1px solid #8ea7b4;height:435px;">
                <p>主题词</p>
                <div class="row treeview treeviewBox" style="overflow-y: scroll;border: 0px;height: 340px;">
                  <table class="table table-hover table-striped tableStyle">
                    <tbody>
                      <tr *ngFor="let val of selectedData">
                        <td>{{val.name}}</td>
                      </tr>
                    </tbody>
                  </table>
                </div>
                <!-- 分页 BEGIN -->
                <app-pagination [getTotalItems]="this.l_total" [showLeft]="false" (isLoadTableFromPagination)="l_pagination($event)"></app-pagination>
                <!-- 分页 END -->

              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- 模态框底部 -->
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
      </div>

    </div>
  </div>
</div>